
<%= turbo_frame_tag dom_id(issue, 'card-icons'), class: "hide-if-empty" do %>
  <%
    # Checking with only css like :empty doesn't work well because there
    # is still a blank space and the pseudo class is not applied
    # We need to hide this otherwise it will leave a little empty vertical space in the card UI
    has_any_icon_showing = (
      issue.description.present? ||
      issue.files.any? ||
      issue.comments.size > 0
    )
  %>

  <% if has_any_icon_showing %>
    <div class="flex flex-row items-center justify-start gap-3 text-base-content">
      <% if issue.description.present? %>
        <i class="ti text-sm ti-align-justified"></i>
      <% end %>
      <% if issue.files.any? %>
        <i class="ti text-sm ti-file"></i>
      <% end %>
      <% if issue.comments.size > 0 %>
        <span class="flex items-center gap-1">
          <i class="ti text-sm ti-message-circle"></i>
          <span class="text-sm" data-issue-comments-count="<%= issue.id %>"><%= issue.comments.size %></span>
        </span>
      <% end %>
    </div>
  <% end %>
<% end %>